Optimal. Leaf size=203 \[ \frac {(11 A-7 B) \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.36, antiderivative size = 203, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3057, 3063, 12,
2861, 211} \begin {gather*} \frac {(11 A-7 B) \text {ArcTan}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a \cos (c+d x)+a}}-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a \cos (c+d x)+a)^{3/2}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a \cos (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 211
Rule 2861
Rule 3057
Rule 3063
Rubi steps
\begin {align*} \int \frac {A+B \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}} \, dx &=-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {\int \frac {\frac {1}{2} a (7 A-3 B)-2 a (A-B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{2 a^2}\\ &=-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}+\frac {\int \frac {-\frac {1}{4} a^2 (19 A-15 B)+\frac {1}{2} a^2 (7 A-3 B) \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}} \, dx}{3 a^3}\\ &=-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}+\frac {2 \int \frac {3 a^3 (11 A-7 B)}{8 \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{3 a^4}\\ &=-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}+\frac {(11 A-7 B) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}} \, dx}{4 a}\\ &=-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}-\frac {(11 A-7 B) \text {Subst}\left (\int \frac {1}{2 a^2+a x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{2 d}\\ &=\frac {(11 A-7 B) \tan ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {(A-B) \sin (c+d x)}{2 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^{3/2}}+\frac {(7 A-3 B) \sin (c+d x)}{6 a d \cos ^{\frac {3}{2}}(c+d x) \sqrt {a+a \cos (c+d x)}}-\frac {(19 A-15 B) \sin (c+d x)}{6 a d \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 3.25, size = 213, normalized size = 1.05 \begin {gather*} \frac {\cos ^3\left (\frac {1}{2} (c+d x)\right ) \left (\frac {i (11 A-7 B) e^{\frac {1}{2} i (c+d x)} \sqrt {e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}\right )} \tanh ^{-1}\left (\frac {1-e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )}{d \sqrt {1+e^{2 i (c+d x)}}}-\frac {(11 A-15 B+24 (A-B) \cos (c+d x)+(19 A-15 B) \cos (2 (c+d x))) \sec \left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{6 d \cos ^{\frac {3}{2}}(c+d x)}\right )}{(a (1+\cos (c+d x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(442\) vs.
\(2(172)=344\).
time = 0.39, size = 443, normalized size = 2.18
method | result | size |
default | \(\frac {\sqrt {a \left (1+\cos \left (d x +c \right )\right )}\, \sin \left (d x +c \right ) \left (33 A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}-21 B \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}+66 A \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}-42 B \sin \left (d x +c \right ) \cos \left (d x +c \right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}+33 A \sin \left (d x +c \right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}-21 B \sin \left (d x +c \right ) \sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right ) \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}-38 A \left (\cos ^{3}\left (d x +c \right )\right )+30 B \left (\cos ^{3}\left (d x +c \right )\right )+14 A \left (\cos ^{2}\left (d x +c \right )\right )-6 B \left (\cos ^{2}\left (d x +c \right )\right )+32 A \cos \left (d x +c \right )-24 B \cos \left (d x +c \right )-8 A \right )}{12 d \,a^{2} \left (-1+\cos \left (d x +c \right )\right ) \left (1+\cos \left (d x +c \right )\right )^{2} \cos \left (d x +c \right )^{\frac {3}{2}}}\) | \(443\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 221, normalized size = 1.09 \begin {gather*} \frac {3 \, \sqrt {2} {\left ({\left (11 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (11 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{3} + {\left (11 \, A - 7 \, B\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{2 \, {\left (a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right )\right )}}\right ) - 2 \, {\left ({\left (19 \, A - 15 \, B\right )} \cos \left (d x + c\right )^{2} + 12 \, {\left (A - B\right )} \cos \left (d x + c\right ) - 4 \, A\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+B\,\cos \left (c+d\,x\right )}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________